const Router = require('koa2-router')
const router = new Router()

const userControll = require('./controller/user')

//添加数据
router.post('/user/adduser',userControll.addUserController)
//查看数据
router.get('/user/getuser',userControll.getUserController)
//删除数据
router.delete('/user/delete/:id',userControll.deleteUserController)
//修改数据
router.put('/user/updatauser',userControll.updataUserController)
//mysql
//查看数据接口
router.get('/user/get',userControll.getListController)
//添加数据接口
router.post('/user/add',userControll.addListController)
//更改数据接口
router.put('/user/updata',userControll.updataListController)
//删除数据接口
router.delete('/user/del',userControll.delListController)
//注册
router.post('/user/registryUser',userControll.registryUsersController)
//登录
router.post('/user/loginUser',userControll.loginUsersController)

module.exports = router